<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});

Route::get('hello/:name', 'index/hello');
Route::get("get_openid/:baseUri/:type", "weixin/openid");
Route::get("gas_openid/:gas", "weixin/gasOpenid");
Route::get("gas_station_openid/:supplier", "weixin/gasStationOpenid");

Route::any("admin/:cont/:fn", "AdminBase/index")->middleware([
    \think\middleware\CheckRequestCache::class,
    // 多语言加载
    // \think\middleware\LoadLangPack::class,
    // Session初始化
    \think\middleware\SessionInit::class,
    \app\AuthorizationMiddleware::class
]);
Route::any("merchant/:cont/:fn", "MerchantBase/index")->middleware([
    \think\middleware\CheckRequestCache::class,
    // 多语言加载
    // \think\middleware\LoadLangPack::class,
    // Session初始化
    \think\middleware\SessionInit::class,
    \app\MerchantMiddleware::class
]);
Route::get("supplier/qrcode/:code", "QrcodeFiles/setCode");
Route::get("supplier/plug/:code", "QrcodeFiles/getMerchantCode");
Route::any("api/:cont/:fn", "ApiBase/index")->middleware([
    \think\middleware\CheckRequestCache::class,
    // 多语言加载
    // \think\middleware\LoadLangPack::class,
    // Session初始化
    \think\middleware\SessionInit::class,
    \app\AllowCrossDomain::class
]);
Route::any("fuhaiCgas", "fuhai_api/create");
Route::any("fuhai_station", "fuhai_api/stationOrder");
Route::any("fuhai_refund", "fuhai_api/stationOrderRefund");
Route::any("fuhai_balance", "fuhai_api/queryBalance");
Route::any("fuhai_query_order", "fuhai_api/queryCoupon");
